<template>
	<div class="sec-top">
		<button class="btn btn-sm btn-primary" @click = "addCustom()">新增活动</button>
	</div>
	<table class="table table-bordered table-hover">
		<caption>普通活动列表</caption>
		<thead>
			<tr>
				<th>活动名称</th>
				<th>活动开始时间</th>
				<th>活动结束时间</th>
				<th></th>
			</tr>
		</thead>
		<tbody>
			<tr v-for="item in cList">
				<td>{{item.name}}</td>
				<td>{{item.startTime}}</td>
				<td>{{item.endTime}}</td>
				<td class="text-right">
					<button v-if="item.name.indexOf('转盘抽奖') > -1" class="btn btn-sm btn-primary" @click="prizeStatistics(item.id, item.name)">中奖统计</button>
					<button class="btn btn-sm btn-primary" @click="updateCustom(item)">修改活动</button>
					<button class="btn btn-sm btn-primary" @click="setPrize(item.id, item.name)">奖品设置</button>
					<button class="btn btn-sm btn-primary" @click="setFakeRecord(item.id, item.name)">假记录设置</button>
					<button class="btn btn-sm btn-primary" @click="getPrizeResult(item.id, item.name)">中奖详情</button>
					<button class="btn btn-sm btn-primary" @click="msgList(item.id, item.name)">消息提醒</button>
				</td>
			</tr>
		</tbody>
	</table>
	<vue-pages :pages.sync="pages" :get-list="getList"></vue-pages>
	<custom-config :show-custom.sync="showCustomAc" :title="cusTitle" :custom="custom"></custom-config>
</template>

<script type="text/javascript" src="./custom-list.js"></script>
